import Vue from 'vue'
import VueRouter from 'vue-router'
// import HomeView from '../views/HomeView.vue'
import login from '@/views/login/index.vue'
import layout from '@/views/layout/index.vue'
import home from '@/views/home/index.vue'
import mstsel from '@/views/mstsel/mstsel.vue'
import mstinfo from '@/views/mstinfo/index.vue'
import addmstinfo from '@/views/mstinfo/addMstInfo.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    name: 'login',
    component: login
  },
  {
    path: '/layout',
    name: 'layout',
    component: layout,
    children: [
      { path: '/', component: home },
      { path: '/mstsel', component: mstsel },
      { path: '/mstinfo', component: mstinfo },
      { path: '/addMstInfo', component: addmstinfo }
    ]
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
